package cl.leshowski.pruebas;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;

import cl.leshowski.comun.Google;

public class imprimePagina {

    public static void main(String args[]) throws Exception {
    
    	Document doc = Jsoup.connect("http://www3.puc.cl/agendauc/index.php/eventos/2011/8/03").get();
    	String title = doc.title();
    	

    	Element link = doc.select("div.post").first();

    	while(link!=null){
    		
    		System.out.println(link.getElementsByTag("h3").first().text()+". Largo:"+link.getElementsByTag("h3").first().text().length());
    		
    		link = link.nextElementSibling();	
    	}
    	
    	String name = Google.shorten("http://twitter.com/leshowski");
    	
    	System.out.println("LA NUEVA URL ES:"+name);
    	
    }
}
